<?
    /**
     * PrincipioLab
     *
     * @package    PrincipioLab
     */

    /**
     * PrincipioLab_Controller_Action
     *
     * @package    PrincipioLab\Controller
     */
    abstract class PrincipioLab_Controller_Action extends Zend_Controller_Action
    {
        const APPLY = "apply";
        const APPLY_VALUE = 1;

        protected $post_data;
        protected $is_post;
        protected $is_apply;


        public function init()
        {
            $this->post_data = $this->_request->getParams();

            if ($this->_request->isPost())
            {
                $this->is_post = true;
                $this->is_apply = (isset($this->post_data[self::APPLY]) && (intval($this->post_data[self::APPLY]) == self::APPLY_VALUE));
            }
            else
            {
                $this->is_post = false;
                $this->is_apply = false;
            };

            parent::init();
        }
    };
?>